package org.example.samplebusiness.controller;
import org.example.samplebusiness.service.BusinessService;
import org.example.dto.OrderDto;
import org.example.response.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Kong
 * @date 2021-9-13 16:51
 */
@RestController
@RequestMapping(value = "/order")
public class BusinessController {
    @Autowired
    private BusinessService businessService;

    @PostMapping(value = "/createOrderAT")
    public R createOrderAT(@RequestBody OrderDto orderDto) {
        return businessService.createOrderAT(orderDto);
    }
    @PostMapping(value = "/createOrderTcc")
    public R createOrderTcc(@RequestBody OrderDto orderDto) {
        return businessService.createOrderTCC(orderDto);
    }
}
